import { createApp } from 'vue'

// import './router/permisssio'
import App from './App.vue'
import router from './router'
import store from './store';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import axios from 'axios'
import $ from 'jquery'
import "bootstrap"
import "bootstrap/dist/css/bootstrap.min.css"
import "bootstrap/dist/js/bootstrap.min.js"

import NProgress from "nprogress";
import "nprogress/nprogress.css";

const app = createApp(App)
axios.defaults.baseURL = import.meta.env.VITE_APP_URL

// app.config.globalProperties.$api = api
// app.config.globalProperties.$axios = axios
// app.config.globalProperties.$global = global

// admin
axios.interceptors.request.use((config)=>{
    // console.log("config=",config)
    config.headers.Authorization = window.sessionStorage.getItem('tokenA');
    // console.log(config.headers.Authorization)
    NProgress.start();
    return config;
});
axios.interceptors.response.use((config)=>{
    NProgress.done();
    return config;
})

app.use(store).use(router).use(ElementPlus)
// app.use(BootstrapVue)
app.mount('#app')
